package com.ibuonline.b2b.entity;

import java.io.Serializable;

public class ArticlePaging implements Serializable {

	private static final long serialVersionUID = -6897490309313496194L;

	//fields
	private java.lang.Integer artId;
	private java.lang.Integer pageNo;
	private java.lang.String content;

	//default constructor
	public ArticlePaging() {
	}

	//constructor with arguments
	public ArticlePaging(java.lang.Integer artId, java.lang.Integer pageNo) {
		this.artId = artId;
		this.pageNo = pageNo;
	}

	//getter
	public java.lang.Integer getArtId() {
		return artId;
	}
	public java.lang.Integer getPageNo() {
		return pageNo;
	}
	public java.lang.String getContent() {
		return content;
	}

	//setter
	public void setArtId(java.lang.Integer artId) {
		this.artId = artId;
	}
	public void setPageNo(java.lang.Integer pageNo) {
		this.pageNo = pageNo;
	}
	public void setContent(java.lang.String content) {
		this.content = content;
	}

	//equals method
	public boolean equals(Object other) {
		if (this == other)
			return true;
		if (!(other instanceof ArticlePaging))
			return false;

		final ArticlePaging articlePaging = (ArticlePaging)other;
		if (!this.artId.equals(articlePaging.getArtId()) || 
			!this.pageNo.equals(articlePaging.getPageNo()))
			return false;

		return true;
	}

	//hashCode method
	public int hashCode() {
		StringBuffer keys = new StringBuffer();
		keys.append(artId).append(",");
		keys.append(pageNo).append(",");
		if (keys.length() > 0)
			keys.deleteCharAt(keys.length() - 1);
		return keys.toString().hashCode();
	}

	//toString method
	public String toString() {
		return new StringBuilder("ArticlePaging[")
			.append("artId=").append(artId).append(", ")
			.append("pageNo=").append(pageNo).append(", ")
			.append("content=").append(content).append("]").toString();
	}
}